package javabook.ch08;

public class todo20111107 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("*****예외처리 프로그램(throws)*****");
		
		try {
			
			System.out.println("***** try step *****");
			//go 메소드 호출
			SearchGo();
			
		} catch (ArrayIndexOutOfBoundsException e) {
			
			System.out.println("***** catch step *****");
			
		}finally{
			System.out.println("***** finally step *****");
		}
	}
		
	public static void SearchGo() throws ArrayIndexOutOfBoundsException{
			String[] ken = {"one", "two", "three"};
			
			int i = 0;
			
			while(i<4){
				try{
					System.out.println(" value is = " + ken[i]);
					
					System.out.println("***** throws step *****\n");
					
					i++;
					
				}catch(ArrayIndexOutOfBoundsException e){
					
					
				}
			}
			
			
	}
}


